<!doctype html>
<html class="no-js">
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>${systemTitle}${systemSubtitle}</title>
    <meta name="description" content="这是一个 table 页面">
    <meta name="keywords" content="table">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="renderer" content="webkit">
    <meta http-equiv="Cache-Control" content="no-siteapp"/>
    <link rel="icon" type="image/png" href="assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="assets/i/app-icon72x72@2x.png">
    <meta name="apple-mobile-web-app-title" content="${systemTitle}${systemSubtitle}"/>
    <link rel="stylesheet" href="/assets/css/amazeui.min.css"/>
    <link rel="stylesheet" href="/assets/css/admin.css">
    <link rel="stylesheet" href="/layer/css/modules/layer/default/layer.css">
    <link rel="stylesheet" href="/layer/css/layui.css">
</head>
<body>
<!--[if lte IE 9]>
<p class="browsehappy">你正在使用<strong>过时</strong>的浏览器，${systemTitle}${systemSubtitle}暂不支持。 请 <a
        href="http://browsehappy.com/" target="_blank">升级浏览器</a>
    以获得更好的体验！</p>
<![endif]-->

<header class="am-topbar admin-header">
    <div class="am-topbar-brand">
        <strong>${systemTitle}</strong>
        <small>${systemSubtitle}</small>
    </div>

    <button class="am-topbar-btn am-topbar-toggle am-btn am-btn-sm am-btn-success am-show-sm-only"
            data-am-collapse="{target: '#topbar-collapse'}"><span class="am-sr-only">导航切换</span> <span
            class="am-icon-bars"></span></button>

    <div class="am-collapse am-topbar-collapse" id="topbar-collapse">
        <ul class="am-nav am-nav-pills am-topbar-nav am-topbar-right admin-header-list">
            <li class="am-dropdown" data-am-dropdown>
                <a class="am-dropdown-toggle" data-am-dropdown-toggle href="javascript:;">
                    <span class="am-icon-users"></span> 管理员 <span class="am-icon-caret-down"></span>
                </a>
                <ul class="am-dropdown-content">
                    <li id="changePassword"><a href="#"><span class="am-icon-user"></span> 修改密码</a></li>
                    <li><a href="/bk/user/logout/"><span class="am-icon-power-off"></span> 退出</a></li>
                </ul>
            </li>

        </ul>
    </div>
</header>

<div class="am-cf admin-main">
    <!-- sidebar start -->
    <div class="admin-sidebar am-offcanvas" id="admin-offcanvas">
        <div class="am-offcanvas-bar admin-offcanvas-bar">
            <ul class="am-list admin-sidebar-list">
                <#list slider as item>
                    <li><a href="${item.link}"><span class="am-icon-sign-out"></span> ${item.title}</a></li>
                </#list>
            </ul>
        </div>
    </div>
    <!-- sidebar end -->

    <!-- content start -->
    <div class="admin-content">

        <div class="am-cf am-padding">
            <div class="am-fl am-cf"><strong class="am-text-primary am-text-lg">${title}</strong> /
                <small>${subtitle}</small>
            </div>
        </div>

        <div class="am-g">
            <div class="am-u-sm-12 am-u-md-6">
                <div class="am-btn-toolbar">
                    <div class="am-btn-group am-btn-group-xs">
                        <a type="button" href="${infoUrl}" class="am-btn am-btn-default"><span class="am-icon-plus"></span> 新增1111
                        </a>
                    </div>
                </div>
            </div>
            <div class="am-u-sm-12 am-u-md-3">
            </div>
        </div>

        <div class="am-g">
            <div class="am-u-sm-12">
                <form class="am-form">
                    <table class="am-table am-table-striped am-table-hover table-main">
                        <thead>
                        <tr>
                            <th class="table-id">ID</th>
                            <th class="table-title"></th>
                            <th class="table-type"></th>
                            <th class="table-author am-hide-sm-only"></th>
                            <th class="table-date am-hide-sm-only"></th>
                            <th class="table-set"></th>
                        </tr>
                        </thead>
                        <tbody>

                        <#list items as item>
                            <tr>
                                <td>${item_index+1}</td>
                                <td><a href="${infoUrl}?id=${item.id}">${(item.name)!''}</a></td>
                                <td></td>
                                <td class="am-hide-sm-only"></td>
                                <td class="am-hide-sm-only"></td>
                                <td>
                                    <div class="am-btn-toolbar">
                                        <div class="am-btn-group am-btn-group-xs">
                                            <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"
                                               href="swithShop?shopId=${item.id}">
                                                <span class="am-icon-trash-o"></span> 切换分店2
                                            </a>
                                            <a class="am-btn am-btn-default am-btn-xs am-text-danger am-hide-sm-only"
                                               href="${deleteUrl}?id=${item.id}">
                                                <span class="am-icon-trash-o"></span> 删除分店
                                            </a>
                                        </div>
                                    </div>
                                </td>
                            </tr>
                        </#list>
                        </tbody>
                    </table>
                    <div class="am-cf" hidden>
                        共 15 条记录
                        <div class="am-fr">
                            <ul class="am-pagination">
                                <li class="am-disabled"><a href="#">«</a></li>
                                <li class="am-active"><a href="#">1</a></li>
                                <li><a href="#">2</a></li>
                                <li><a href="#">3</a></li>
                                <li><a href="#">4</a></li>
                                <li><a href="#">5</a></li>
                                <li><a href="#">»</a></li>
                            </ul>
                        </div>
                    </div>
                    <hr/>
                </form>
            </div>

        </div>
    </div>
    <!-- content end -->
</div>


<a href="#" class="am-icon-btn am-icon-th-list am-show-sm-only admin-menu"
   data-am-offcanvas="{target: '#admin-offcanvas'}"></a>

<footer>
    <hr>
    <p class="am-padding-left">${footer}</p>
</footer>

<script src="/assets/js/jquery-2.1.0.js"></script>

<script src="/assets/js/amazeui.min.js"></script>
<script src="/assets/js/amazeui.js"></script>
<script src="/cjwJs/utils.js"></script>
<script src="/assets/js/app.js"></script>
<script src="/cjwJs/uploadimage.js"></script>
<script src="/layer/layui.js"></script>
<script src="/layer/layer.js"></script>
<script>
    $('#changePassword').on('click', function () {
        layer.open({
            type: 1,
            id: 'layerDemo' + 1,
            title: '修改密码',
            content: '<div style="padding: 10px 20px;"> <input type="password" name="oldPassworld" style="padding: 5px 10px" placeholder="输入原密码" pattern="^\d{6}$" required/></div><div style="padding: 10px 20px;"> <input type="password" name="password" style="padding: 5px 10px" placeholder="输入新密码" pattern="^\d{6}$" required/></div>',
            btn: '确定',
            btnAlign: 'c' //按钮居中
            , shade: 0 //不显示遮罩
            , btn1: function () {
                var url = '/bk/shop/changePassword/';
                var password = $('input[name="password"]').val();
                var oldPassworld = $('input[name="oldPassworld"]').val();
                layer.closeAll();
                var href = url + '?password=' + password + '&oldPassworld=' + oldPassworld;
                rquestStatus(href)
            }
        });
    });
</script>
</body>
</html>
